
DOCUMENTATION OF DosFS MODULE, VERSION 1.00

Author         : Rob Schrauwen
Date           : 27th June 1989
Status         : Finished
Acknowlegdement: Time conversion from DOS to Arc programmed by
                 Erik Admiraal                     

The DosFS module implements a filing system which is able to read
and write RSDOS files (i.e. MSDOS and Atari ST compatible). It has
full subdirectory support, and works transparantly with other
Risc-OS applications.

TO USE !DOSFS FROM THE FILER: Just double-click on the DosFS icon.

The DosFS module itself can be used under Arthur 1.20, using the
familiar *-commands. The DosFS module is filing system number 50.
Generally, access times are fairly fast (compared to the ST). They
could be faster, since in the present state DosFS cannot assume
that the same disc is in the drive since the last operation. This is
especially  noticable with multiple file operations in subdirectories.
 
The following *commands are recognized (apart from the filing
system dependent commands, of course, which are explained later):

*DosFS    : Selects the RSDOS-filing system (useful for command
            line and Arthur applications)
*ExtSep   : Sets or shows the Extension Separator (whose function
            is explained below)
*BytesFree: Shows the number of bytes free (calculated by the
            number of 0-entries in the FAT).

The Extension Separator (extsep) is introduced to overcome the
extension problem, i.e. to avoid clashes between FileSwitch and
DosFS, as well as severe interpretation problems since the ".",
used by DOS to separate the filename and the extension, cannot
be used as separator. The default separator in DosFS is "_",
so a file FILE.EXT is called FILE_EXT under DosFS. This can be
changed, for example if a file on the disc has an underline
character in its name, by using *ExtSep <symbol>.

The extsep is available for programmers in the system variable
DosFS$ExtSep. Please use *ExtSep to change the value, not *Set
DosFS$ExtSep. This variable can be used in command scripts or
aliases, e.g.

   Set Alias$CopyTxT COPY dosfs:%0<DosFS$ExtSep>TXT ram:%0 Q

can be used to copy files with extension TXT to files without, and
even works if %0.TXT has more than 10 characters.

File names under RSDOS may be longer than 10 characters, e.g.
AUTOEXEC_BAT, but some Archimedes programs do not accept more than
10. Note that using the command line interpreter (F12), those 
files are still available, e.g. for copying or renaming to a file
with a smaller name. Then they can be used in the Desktop.

Note that DOS text files use CR+LF as end-of-line, whereas on the
Arc just LF is used (sometimes CR). It is possible to use !Edit
to change this (replace \n by \x0D\x0A with 'magic mode' on).

The DosFS works best if discs are given volume labels (not possible
with DosFS itself).

RESTRICTIONS (some of which will be removed in the future)

1. Only drive :0 and 720 K discs are supported.

2. No current directory can be set (always use full path or the 
   desktop), no library can be set (would be ridiculous).
   
3. Only whole-file operations are possible. (If you use *COPY from
   the command line, you must therefore use the Q(uick) option!).
   This means BGet and BPut fail, so several applications (such as
   1st Word Plus) cannot read/write directly. Use, for instance, the
   RAM-disc for intermedeate storage.

4. Ownership of the disc drive is not (yet) handled very well.
   You'd better not COPY files from RSDOS onto ADFS floppies or vice
   versa in the desktop!!! This is because the P option isn't set.
   Copying to the ramdisc, hard disc or floppy other that :0 with Q
   option, works fine, so does *COPY from the command line with P
   and Q options set (prompt & quick).

5. Wildcards are not supported (use the desktop!).

6. The *BytesFree command will be changed to accept *Free, this how-
   ever requires another instantation of FileCore etc..

7. Directories cannot be deleted, and access cannot be changed. The
   access translation is as follows: hidden=RL, read only=R,
   directory=DL, default=WR. To change, use the PC-emulator.

Since the release of version 1.00 four minor improvements have been
made.

Currently Implemented:

OS_File:      R0=0   Save file (+others (*)) (*SAVE)
              R0=5   Read catalogue info
              R0=6   Delete file (*DEL., *REN., etc.)
              R0=7   Create file (*CREATE)
              R0=8   Create directory (*CDIR)
              R0=&FF Load file (+others (*)) (*LOAD)

OS_GBPB:      R0=5   Read name and boot option (=0) of disc
              R0=9   Read entries from directory
              R0=10  Read entries and information

OS_FSControl: R0=5   Catalogue directory  (*CAT)
              R0=6   Examine directory (*EX)
              R0=9   Examine objects (*INFO / *FILEINFO)
              R0=18  Expands file type &111 (also in File$Type)
              R0=25  Rename (*REN.)
              R0=26  Copy with R3 bit 5 set (*COPY Q)
              R0=27  Wipe objects (*WIPE)
              R0=28  Count objects (*COUNT)

OS_UpCall:    The upcall "media not present" is issued whenever
              media is not present. Due to Risc-OS (not DosFS) 
              when a ADFS disc is in the drive when a RSDOS disc
              is expected, three attempts are made to read the disc
              before the upcall is issued, and an error message
              appears prompting for a disc.

(*) Note: some of the features are actually implemented by the
    FileSwitch module, and there may be more variants.

---------------------------------------------------------------------
Remark on the extension problem.

DOS would allow the existence of the following files and directories:

         \FILE.EXT              $.FILE_EXT
In Dos:  \FILE       in DosFS:  $.FILE
         \FILE\EXT              $.FILE.EXT

This may be unlikely, but it is possible. It is clear that using
"." as extsep gives ambiguity. We cannot pretend that files called
FILE with different extensions EX1, EX2,... are files EX1, EX2,...
in a directory FILE (the most obvious solution, since names read as
with DOS apart from "\", but not very practical as most names have
an extension and  the overview is lost easily). For the same reason
reversing extensions and names (just as in Archimedes C) cannot be
used. The "_" solution works but one may get bad names (longer than
10 characters), such as AUTOEXEC_BAT.
          
---------------------------------------------------------------------
DISCLAIMER                                                         

This module has been thoroughly tested. However, in no circumstances
the author will be liable for any damage or loss of data, etc..
Rob Schrauwen (email: wwasier@hutruu0.bitnet).
